package com.ziyun.erp.modules.material.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.ziyun.erp.modules.material.entity.dto.StoreStockMaterialDto;
import io.renren.common.exception.RRExceptionHandler;
import io.renren.common.utils.PageUtils;
import com.ziyun.erp.modules.material.entity.MaterialEntity;
import io.renren.common.utils.R;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 原料耗材库
 *
 * @author guizhao
 * @email ...
 * @date 2018-08-08 11:23:33
 */
public interface MaterialService extends IService<MaterialEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void deleteUpdateById(Integer materialId, Long userId);

    void auditById(Integer materialId);

    void queryMaterialsListPage(Page<MaterialEntity> page, Map<String,Object> params);

    int getparentId(Integer categoryId);

    String CreateMaterialCode(int ParentId,int CategoryId);

    String selectMaterialId(String materialCode);

    int saveMaterialByStockId(Integer stockId,String materialId,BigDecimal cost);

    Integer selectStockId(Integer sellerId);

    R saveStoreStockMaterialBystockId(Integer sellerId,String materialId, BigDecimal cost) throws Exception;

    R saveMaterialAndStoreStockMaterial(StoreStockMaterialDto storeStockMaterialDto) throws Exception;
}

